package parking.abcast;

import java.io.Serializable;

/**
 * Class used by the initiator of a diffusion after having received all the clock.idSender values and
 * chosen the maximum of those values. The chosen value is finally diffused to all the members of the group
 * @author Sophie and Ronnie
 * @date 9 November 2013
 */
public class MessageFinalDiffusion implements Serializable {
	
	private static final long serialVersionUID = -2737281366313510666L;
	private String idMessage;	//id of the message
	private float diffusionMax;	//the max value calculated
	
	/**
	 * Constructor of the class
	 * @param idMessage	: represents the id of the message
	 * @param diffusionMax : the max value calculated
	 */
	public MessageFinalDiffusion(String idMessage, float diffusionMax) {
		this.idMessage = idMessage;
		this.diffusionMax = diffusionMax;
	}

	/**
	 * @return the current ID of the message
	 */
	public String getIdMessage() {
		return idMessage;
	}

	/**
	 * @return the max value previously calculated
	 */
	public float getDiffusionMax() {
		return diffusionMax;
	}
	
}
